<?php

class m130807_162648_create_table_organizations extends CDbMigration
{
	public function up()
	{
		$this->createTable('{{organizations}}',array(
			'id'=>'pk',
			'name'=>'VARCHAR(255) NOT NULL',
			'active'=>'INT(1) NOT NULL DEFAULT 1'
		));

		$this->insert('{{organizations}}',array(
			'name'=>'Inter Trade'
		));

		$this->insert('{{organizations}}',array(
			'name'=>'Trader'
		));

		$this->insert('{{organizations}}',array(
			'name'=>'FoxCon'
		));

		$this->insert('{{organizations}}',array(
			'name'=>'Apexis'
		));

		$this->insert('{{organizations}}',array(
			'name'=>'Logitec'
		));
	}

	public function down()
	{
		$this->dropTable('{{organizations}}');
	}

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}